package the.workshop.tms.order.dto;

import lombok.Data;
import org.springframework.beans.BeanUtils;
import the.workshop.tms.order.infrastructure.persistent.model.OrderDO;

@Data
public class OrderDTO {
    private Long id;
    private String code;
    private String senderName;
    private String senderTel;
    private String receiverName;
    private String receiverTel;
    private String receiverAddress;

    public OrderDO toOrder() {
        OrderDO entity = new OrderDO();
        BeanUtils.copyProperties(this, entity);
        return entity;
    }
}
